# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Spectrum.V1explorer.Model.PawsInitRequest do
  @moduledoc """
  The initialization request message allows the master device to initiate exchange of capabilities with the database.

  ## Attributes

  - deviceDesc (DeviceDescriptor): The DeviceDescriptor parameter is required. If the database does not support the device or any of the rulesets specified in the device descriptor, it must return an UNSUPPORTED error code in the error response. Defaults to: `null`.
  - location (GeoLocation): A device&#39;s geolocation is required. Defaults to: `null`.
  - type (String.t): The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...).  Required field. Defaults to: `null`.
  - version (String.t): The PAWS version. Must be exactly 1.0.  Required field. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deviceDesc => GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor.t(),
          :location => GoogleApi.Spectrum.V1explorer.Model.GeoLocation.t(),
          :type => any(),
          :version => any()
        }

  field(:deviceDesc, as: GoogleApi.Spectrum.V1explorer.Model.DeviceDescriptor)
  field(:location, as: GoogleApi.Spectrum.V1explorer.Model.GeoLocation)
  field(:type)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.Spectrum.V1explorer.Model.PawsInitRequest do
  def decode(value, options) do
    GoogleApi.Spectrum.V1explorer.Model.PawsInitRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Spectrum.V1explorer.Model.PawsInitRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
